package com.company.task4;

import java.util.ArrayList;
import java.util.List;

public class TraverseStudentInfo {

    public static void traverseFunction(List<ArrayList> studentList){

        if(0 == studentList.size()){
            System.out.println("系统中无学生信息，请选择增加选项增添学生信息！");
            return;
        }

        System.out.println("学号 姓名 年龄");

        //遍历学生信息
        for(ArrayList list: studentList){
            System.out.print(list.get(0));
            System.out.print(list.get(1));
            System.out.print(list.get(2));
            System.out.println();
        }
    }
}
